<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.EditCreditcardTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.EditCreditcardLabel_creditcardid}" for="creditcardid" />
                    <h:inputText id="creditcardid" value="#{creditcardController.selected.creditcardid}" title="#{bundle.EditCreditcardTitle_creditcardid}" required="true" requiredMessage="#{bundle.EditCreditcardRequiredMessage_creditcardid}"/>
                    <h:outputLabel value="#{bundle.EditCreditcardLabel_creditcardtype}" for="creditcardtype" />
                    <h:inputText id="creditcardtype" value="#{creditcardController.selected.creditcardtype}" title="#{bundle.EditCreditcardTitle_creditcardtype}" required="true" requiredMessage="#{bundle.EditCreditcardRequiredMessage_creditcardtype}"/>
                    <h:outputLabel value="#{bundle.EditCreditcardLabel_creditcardnumber}" for="creditcardnumber" />
                    <h:inputText id="creditcardnumber" value="#{creditcardController.selected.creditcardnumber}" title="#{bundle.EditCreditcardTitle_creditcardnumber}" required="true" requiredMessage="#{bundle.EditCreditcardRequiredMessage_creditcardnumber}"/>
                    <h:outputLabel value="#{bundle.EditCreditcardLabel_creditcardexpirationmonth}" for="creditcardexpirationmonth" />
                    <h:inputText id="creditcardexpirationmonth" value="#{creditcardController.selected.creditcardexpirationmonth}" title="#{bundle.EditCreditcardTitle_creditcardexpirationmonth}" required="true" requiredMessage="#{bundle.EditCreditcardRequiredMessage_creditcardexpirationmonth}"/>
                    <h:outputLabel value="#{bundle.EditCreditcardLabel_creditcardexpirationyear}" for="creditcardexpirationyear" />
                    <h:inputText id="creditcardexpirationyear" value="#{creditcardController.selected.creditcardexpirationyear}" title="#{bundle.EditCreditcardTitle_creditcardexpirationyear}" required="true" requiredMessage="#{bundle.EditCreditcardRequiredMessage_creditcardexpirationyear}"/>
                    <h:outputLabel value="#{bundle.EditCreditcardLabel_creditcardverificationnumber}" for="creditcardverificationnumber" />
                    <h:inputText id="creditcardverificationnumber" value="#{creditcardController.selected.creditcardverificationnumber}" title="#{bundle.EditCreditcardTitle_creditcardverificationnumber}" />
                    <h:outputLabel value="#{bundle.EditCreditcardLabel_savecreditcardnumber}" for="savecreditcardnumber" />
                    <h:inputText id="savecreditcardnumber" value="#{creditcardController.selected.savecreditcardnumber}" title="#{bundle.EditCreditcardTitle_savecreditcardnumber}" required="true" requiredMessage="#{bundle.EditCreditcardRequiredMessage_savecreditcardnumber}"/>
                    <h:outputLabel value="#{bundle.EditCreditcardLabel_customerid}" for="customerid" />
                    <h:selectOneMenu id="customerid" value="#{creditcardController.selected.customerid}" title="#{bundle.EditCreditcardTitle_customerid}" required="true" requiredMessage="#{bundle.EditCreditcardRequiredMessage_customerid}">
                        <f:selectItems value="#{customerController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                </h:panelGrid>
                <h:commandLink action="#{creditcardController.update}" value="#{bundle.EditCreditcardSaveLink}"/>
                <br />
                <br />
                <h:commandLink action="View" value="#{bundle.EditCreditcardViewLink}" immediate="true"/>
                <br />
                <h:commandLink action="#{creditcardController.prepareList}" value="#{bundle.EditCreditcardShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:commandLink value="#{bundle.EditCreditcardIndexLink}" action="/index" immediate="true" />
            </h:form>
        </ui:define>
    </ui:composition>

</html>
